Skip to content

fix(tests): disambiguate EtcdFilterType.none in EtcdQueryBuilderTests#1718

Merged
datlechin merged 2 commits into
TableProApp:mainfrom
mvanhorn:fix/etcd-query-builder-tests-none-ambiguity
Jun 18, 2026
Merged

fix(tests): disambiguate EtcdFilterType.none in EtcdQueryBuilderTests#1718
datlechin merged 2 commits into
TableProApp:mainfrom
mvanhorn:fix/etcd-query-builder-tests-none-ambiguity

Conversation

@mvanhorn

Copy link
Copy Markdown
Contributor

The Etcd query-builder test target fails to build under the current Swift toolchain: parsed?.filterType == .none resolves .none to Optional<EtcdFilterType>.none rather than EtcdFilterType.none. Under warnings-as-errors that breaks the whole macOS App Tests target, and semantically the comparison checked filterType against nil instead of the .none enum case (each call site already asserts parsed != nil).

This spells out EtcdFilterType.none at the four call sites so the assertions check the intended enum case and the target builds. No production code changed.

mvanhorn and others added 2 commits June 18, 2026 06:51
`parsed?.filterType == .none` resolves `.none` to `Optional<EtcdFilterType>.none`
under the current Swift toolchain, which (a) trips the warnings-as-errors build of
the test target and (b) compares filterType against nil rather than the intended
`EtcdFilterType.none` case. Since each call site already asserts `parsed != nil`,
spell out `EtcdFilterType.none` so the assertion checks the enum case it means to.
@datlechin datlechin merged commit ff060f1 into TableProApp:main Jun 18, 2026
3 checks passed
@mvanhorn

Copy link
Copy Markdown
Contributor Author

Thanks for reviewing and merging, @datlechin. Disambiguating EtcdFilterType.none gets the query-builder test building under the current Swift toolchain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants